@extends('layouts.master')
@section('content') 
   <div class="row">
	<div id="breadcrumb" class="col-md-12">
		<ol class="breadcrumb">
			<li><a href="">Dashboard</a></li>			
			<li><a href="#">Category</a></li>
		</ol>
	</div>
</div>
<div class="row">
	<div class="col-xs-12 col-sm-12">
		<div class="box">
			
			<div class="box-content">
				<form id="categoryForm" method="post" class="form-horizontal">
					<fieldset>
					
						<div class="form-group">
							<div class="col-sm-9 col-sm-offset-3">
								@if(Session::has('errMg'))
								    <div class="alert-box errMg">
								     {{ Session::get('errMg') }}
								    </div>
								@endif
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">Language <span class="note">*</span></label>
							<div class="col-sm-5">
								<select class="populate placeholder form-control" name="LanguageID" 
								 	id = "languge"
		                            data-rule-required="true"
		                            data-msg-required="Please select a languge !"
		                            
								>
									<option value="">-- Select a language --</option>
									@foreach($allLang as $lag)
									<option value="{{$lag->id}}">{{$lag->name}}</option>									
									 @endforeach
								</select>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label">Category <span class="note">*</span></label>
							<div class="col-sm-5">
								<input type="text" class="form-control" name="name" 
		                            id = "name"
		                            data-rule-required="true"
		                            data-msg-required="Please enter category name !"
		                        />
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label">Description</label>
							<div class="col-sm-5">
								<textarea class="form-control" rows="3" id="wysiwig_simple" name="description"></textarea>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label">Status</label>
							<div class="col-sm-5">
								<select class="populate placeholder form-control " name="status" >									
									
									@foreach($allStatus as $key=> $status)
									<option value="{{$key}}">{{$status}}</option>									
									 @endforeach
									
								</select>
							</div>
						</div>
						
					</fieldset>					
					
					<div class="form-group">
						<div class="col-sm-9 col-sm-offset-3">
						<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
							<button type="submit" class="btn btn-primary">Submit</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	
</div>
<script type="text/javascript">
    var $form = $("#categoryForm");
    $form.validate();
    $form.submit(function (event) {
     /* if ($form.validate().valid()) {
          event.preventDefault();
          alert("acction logic");
      }*/
    });
    $('#name').alphanum({
		allow: ''
	});

</script>


@stop

